#include "constants/event_objects.h"
#include "constants/layouts.h"
#include "constants/maps.h"
#include "constants/pokemon.h"
#include "constants/rogue.h"
#include "constants/trainers.h"
#include "constants/weather.h"

#define ENCOUNTER_MAP(id, map) { .encounterId=id, .layout=LAYOUT_##map, .group=MAP_GROUP(map), .num=MAP_NUM(map) }

const u8 gRogueTypeWeatherTable[] = 
{
    [TYPE_NONE] = WEATHER_NONE,
    [TYPE_NORMAL] = WEATHER_NONE,
    [TYPE_FIGHTING] = WEATHER_SUNNY,
    [TYPE_FLYING] = WEATHER_NONE,
    [TYPE_POISON] = WEATHER_SHADE,
    [TYPE_GROUND] = WEATHER_SANDSTORM,
    [TYPE_ROCK] = WEATHER_SANDSTORM,
    [TYPE_BUG] = WEATHER_SHADE,
    [TYPE_GHOST] = WEATHER_SHADE,
    [TYPE_STEEL] = WEATHER_SANDSTORM,
    [TYPE_MYSTERY] = WEATHER_UNDERWATER_BUBBLES,
    [TYPE_FIRE] = WEATHER_DROUGHT,
    [TYPE_WATER] = WEATHER_DOWNPOUR,
    [TYPE_GRASS] = WEATHER_LEAVES,
    [TYPE_ELECTRIC] = WEATHER_RAIN_THUNDERSTORM,
    [TYPE_PSYCHIC] = WEATHER_PSYCHIC_FOG,
    [TYPE_ICE] = WEATHER_SNOW,
    [TYPE_DRAGON] = WEATHER_NONE,
    [TYPE_DARK] = WEATHER_SHADE,
#ifdef ROGUE_EXPANSION
    [TYPE_FAIRY] = WEATHER_MISTY_FOG,
#endif
};

const struct RogueEncounterMap gRogueTypeToEliteRoom[] = 
{
    [TYPE_NONE] = ENCOUNTER_MAP(0, ROGUE_BOSS_11),
    [TYPE_NORMAL] = ENCOUNTER_MAP(0, ROGUE_BOSS_8),
    [TYPE_FIGHTING] = ENCOUNTER_MAP(0, ROGUE_BOSS_8),
    [TYPE_FLYING] = ENCOUNTER_MAP(0, ROGUE_BOSS_8),
    [TYPE_POISON] = ENCOUNTER_MAP(0, ROGUE_BOSS_9),
    [TYPE_GROUND] = ENCOUNTER_MAP(0, ROGUE_BOSS_11),
    [TYPE_ROCK] = ENCOUNTER_MAP(0, ROGUE_BOSS_11),
    [TYPE_BUG] = ENCOUNTER_MAP(0, ROGUE_BOSS_9),
    [TYPE_GHOST] = ENCOUNTER_MAP(0, ROGUE_BOSS_9),
    [TYPE_STEEL] = ENCOUNTER_MAP(0, ROGUE_BOSS_11),
    [TYPE_MYSTERY] = ENCOUNTER_MAP(0, ROGUE_BOSS_10),
    [TYPE_FIRE] = ENCOUNTER_MAP(0, ROGUE_BOSS_11),
    [TYPE_WATER] = ENCOUNTER_MAP(0, ROGUE_BOSS_10),
    [TYPE_GRASS] = ENCOUNTER_MAP(0, ROGUE_BOSS_8),
    [TYPE_ELECTRIC] = ENCOUNTER_MAP(0, ROGUE_BOSS_8),
    [TYPE_PSYCHIC] = ENCOUNTER_MAP(0, ROGUE_BOSS_9),
    [TYPE_ICE] = ENCOUNTER_MAP(0, ROGUE_BOSS_10),
    [TYPE_DRAGON] = ENCOUNTER_MAP(0, ROGUE_BOSS_11),
    [TYPE_DARK] = ENCOUNTER_MAP(0, ROGUE_BOSS_8),
#ifdef ROGUE_EXPANSION
    [TYPE_FAIRY] = ENCOUNTER_MAP(0, ROGUE_BOSS_10),
#endif
};

#undef ENCOUNTER_MAP
